// 基于template/src/views/{{appModules}}/{{pages@DEGRIDVIEW}}/{{spinalCase page.codeName}}-model.ts.hbs生成
import { IGridViewModel } from '@/core/interface/view/model';

function getModel(): IGridViewModel {
	return {
		caption: '机构全部人员信息',
		title: '机构全部人员信息',
		capPSLanguageRes: 'DE.LNAME.SYS_PERSON',
		titlePSLanguageRes: '',
		showDataInfoBar: false,
		codeName: 'sys_personOrgPersonView',
		uiEngineModel: [
			{
				name: 'toolbar_deuiaction1_click',
				triggerType: 'CTRLEVENT',
				logicType: 'APPVIEWUIACTION',
				eventNames: 'CLICK',
				scriptCode: ``,
				logicName: ``,
				logicTag: '',
				eventArg: 'deuiaction1',
				eventArg2: '',
				timer: 0,
				psViewCtrlName: 'toolbar',
				uIActionTag: 'New',
				entityCodeName: '',
			},
			{
				name: 'toolbar_deuiaction3_click',
				triggerType: 'CTRLEVENT',
				logicType: 'APPVIEWUIACTION',
				eventNames: 'CLICK',
				scriptCode: ``,
				logicName: ``,
				logicTag: '',
				eventArg: 'deuiaction3',
				eventArg2: '',
				timer: 0,
				psViewCtrlName: 'toolbar',
				uIActionTag: 'Import',
				entityCodeName: '',
			},
			{
				name: 'toolbar_deuiaction2_click',
				triggerType: 'CTRLEVENT',
				logicType: 'APPVIEWUIACTION',
				eventNames: 'CLICK',
				scriptCode: ``,
				logicName: ``,
				logicTag: '',
				eventArg: 'deuiaction2',
				eventArg2: '',
				timer: 0,
				psViewCtrlName: 'toolbar',
				uIActionTag: 'Remove',
				entityCodeName: '',
			},
			{
				name: 'newdata',
				triggerType: 'CUSTOM',
				logicType: 'SYSUILOGIC',
				eventNames: '',
				scriptCode: ``,
				logicName: ``,
				logicTag: '',
				eventArg: '',
				eventArg2: '',
				timer: 0,
				psViewCtrlName: '',
				entityCodeName: '',
			},
			{
				name: 'opendata',
				triggerType: 'CUSTOM',
				logicType: 'SYSUILOGIC',
				eventNames: '',
				scriptCode: ``,
				logicName: ``,
				logicTag: '',
				eventArg: '',
				eventArg2: '',
				timer: 0,
				psViewCtrlName: '',
				entityCodeName: '',
			},
		],
		ctrls: [
			{
				name: 'toolbar',
				codeName: 'OrgPersonViewtoolbar',
				controlType: 'TOOLBAR',
			},
			{
				name: 'grid',
				codeName: 'Usr0302075506',
				controlType: 'GRID',
			},
			{
				name: 'searchform',
				codeName: 'Usr0302334929',
				controlType: 'SEARCHFORM',
			},
		],
		ctrlParams: {
			Sys_persontoolbar: {},
			Sys_persongrid: {},
			Sys_personsearchform: {},
		},
		cssName: '',
		name: 'sys_personOrgPersonView',
		viewType: 'DEGRIDVIEW',
		viewStyle: 'DEFAULT',
		showCaption: true,
		isLoadDefault: true,
		entityCodeName: 'Sys_person',
		keyPSAppDEField: 'Id',
		majorPSAppDEField: 'Display_name',
		enableQuickSearch: true,
		expandSearchForm: false,
		newData: {
			deCodeName: 'Sys_person',
			newDataViewName: 'sys_personOrgPersonNewEditView',
		},
		openData: {
			redirectView: true,
			redirectParam: {
				redirectAction: '',
			},
			deCodeName: 'Sys_person',
			openDataViewName: 'sys_personRedirectView',
		},
		toolbarItems: [
			{
				actionLevel: '100',
				caption: '新建人员',
				captionLanResTag: 'TBB.TEXT.*.NEW',
				name: 'deuiaction1',
				showCaption: true,
				tooltip: '新建人员',
				tooltipLanResTag: 'TBB.TOOLTIP.*.NEW',
				itemType: 'DEUIACTION',
				showIcon: true,
				disabled: false,
				cssName: '',
				imagePath: '',
				iconCls: 'fa fa-file-text-o',
				imagePathX: '',
				dataAccessAction: '',
				noPrivDisplayMode: 2,
				uiAction: {
					codeName: 'New',
					uIActionMode: 'SYS',
					actionTarget: '',
					uIActionTag: 'New',
					uIActionType: 'DEUIACTION',
				},
				logic: {
					name: 'toolbar_deuiaction1_click',
					actionTag: 'New',
					xDataCtrlName: 'grid',
					predefinedType: 'EDITVIEW_NEWACTION',
				},
			},
			{
				actionLevel: '100',
				caption: '数据导入',
				captionLanResTag: '',
				name: 'deuiaction3',
				showCaption: true,
				tooltip: '数据导入',
				tooltipLanResTag: '',
				itemType: 'DEUIACTION',
				showIcon: true,
				disabled: false,
				cssName: '',
				imagePath: '',
				iconCls: 'fa fa-upload',
				imagePathX: '',
				dataAccessAction: '',
				noPrivDisplayMode: 2,
				uiAction: {
					codeName: 'Import',
					uIActionMode: 'SYS',
					actionTarget: '',
					uIActionTag: 'Import',
					uIActionType: 'DEUIACTION',
				},
				logic: {
					name: 'toolbar_deuiaction3_click',
					actionTag: 'Import',
					xDataCtrlName: 'grid',
					predefinedType: 'GRIDVIEW_IMPORTBAR',
				},
			},
			{
				actionLevel: '100',
				caption: '删除人员',
				captionLanResTag: 'TBB.TEXT.*.REMOVE',
				name: 'deuiaction2',
				showCaption: true,
				tooltip: '当前操作将删除人员及人员所在部门、用户组的关系',
				tooltipLanResTag: 'TBB.TOOLTIP.*.REMOVE',
				itemType: 'DEUIACTION',
				showIcon: true,
				disabled: false,
				cssName: '',
				imagePath: '',
				iconCls: 'fa fa-trash',
				imagePathX: '',
				dataAccessAction: '',
				noPrivDisplayMode: 2,
				uiAction: {
					codeName: 'Remove',
					uIActionMode: 'SYS',
					actionTarget: 'MULTIKEY',
					uIActionTag: 'Remove',
					uIActionType: 'DEUIACTION',
				},
				logic: {
					name: 'toolbar_deuiaction2_click',
					actionTag: 'Remove',
					xDataCtrlName: 'grid',
					predefinedType: 'GRIDVIEW_REMOVEACTION',
				},
			},
		],
		xDataCtrlName: 'grid',
		quickSearchPlaceholder: ['名称', 'uid/loginname'].join(','),
		useDefaultLayout: true,
		enableRowEdit: false,
		rowActiveMode: 0,
		rowEditDefault: false,
	};
}

export const model = getModel();
